#ifndef SCREENSHOTTOOL_H
#define SCREENSHOTTOOL_H

#include "customtoolbutton.h"
#include <QWidget>
#include <QQueue>

namespace Ui {
class screenshotTool;
}

class ScreenshotTool : public QWidget
{
    Q_OBJECT

public:
    enum shape
    {
        None,
        Line,
        Rect,
        Text
    };
    explicit ScreenshotTool(QWidget *parent = nullptr);
    ~ScreenshotTool();

Q_SIGNALS:
    void screenshotComplete(bool toClipBoard);
    void saveScreenshot();
    void pasteOnTheScreen();
    void drawShape(shape s);
    void ShowWindow();
    void HideWindow();
    void Undo();
    void Redo();

public Q_SLOTS:
    void ok();
    void cancel();
    void pin();
    void drawLine(bool checked);
    void drawRect(bool checked);
    void drawText(bool checked);
    void savePixmap();
    void EnableUndo(bool bEnable);
    void EnableRedo(bool bEnable);

protected:
    virtual void mousePressEvent(QMouseEvent *event);
    virtual void mouseReleaseEvent(QMouseEvent *event);
    virtual void mouseDoubleClickEvent(QMouseEvent *event);
    virtual void mouseMoveEvent(QMouseEvent *event);
    virtual void enterEvent(QEvent *event);
    virtual void leaveEvent(QEvent *event);
    virtual void paintEvent(QPaintEvent *event);
    virtual void showEvent(QShowEvent *event);
    virtual void hideEvent(QHideEvent *event);
private:
    void Init();
private:
//    Ui::screenshotTool *ui;
    CCustomToolButton m_Ok;
    CCustomToolButton m_Cancel;
    CCustomToolButton m_Pin;
    CCustomToolButton m_SavePixmap;
    CCustomToolButton m_Undo;
    CCustomToolButton m_Redo;
    Qt::CursorShape m_nCursor;
    shape m_nShape;
};

#endif // SCREENSHOTTOOL_H
